<div class="zs-body" data-ng-init="
		formInit('roles', {
			keyField:'id',
			randomFields:['id']
		}) && 
		formInit('userinfo', {
			ssn:'vuserinfo',
			esn:'userinfo',
			keyField:'userid',
			randomFields:['userid'],
			orderObject:{userid:0} 
		});setConHei();loadData('userinfo');">
	<div class="zs-map-tool">
		<div class="location">
			<a >首页</a>
			<i class="right-arr"></i>
			<a >运维管理</a>
			<i class="right-arr"></i>
			<a >用户管理</a>
		</div>
		<div class="option">
			<!-- <input type="button" class="zs-btn orange" value="新建" ng-show="mi.sa"
				ng-click="addRow('userinfo') && openWindow('edit');"/>
			<input type="button" class="zs-btn orange" value="编辑"
				ng-click="editRow('userinfo', userinfo.sRows[0]) && openWindow('edit')"/>
			<input type="button" class="zs-btn orange" value="删除 " 
				ng-click="delEntitys('userinfo')"/>
			<input type="button" class="zs-btn orange" value="登录授权 " 
				ng-click="userAuthentication() && openWindow('edit2')"/> -->
			<input type="button" class="zs-btn orange" value="用户角色授权 " ng-show="mi.sa"
				ng-click="editRow('userinfo', userinfo.sRows[0]) && openWindow('edit3')"/>
		</div>
	</div>
	<!--<div class="zs-tree">
        <div class="zs-nice-tab idTabs">
            <div class="tool item" style="margin-left:6px;">
                <span class="search-warpper" style="width:230px">
                    <i class="icon"></i>
                    <input type="text" class="zs-input" placeholder="机构名称" 
                    	ng-model="dicTree.filterValue" 
                    	ng-change="comboFilter('dicTree')"/>
                </span>
            </div>
        </div>
        <div style="margin-left: 15px;margin-top: 15px;margin-right: 15px;">
            <ag-Tree fn='dicTree'
				para="{ uDictionary:true,
					dictionary:'p_organization',
					checkbox:false,
					pidField:'pid',
					leafField:'leaf',
					intLoadLevel:2}"
				onselect="userOrgSearch"
				ng-model='o'/>
        </div>
    </div>-->
    <div class="zs-content" style="position:unset">
    	<div class="zs-nice-tab idTabs">
    		<div class="tool item" style="margin-left:6px">
	    		<span class="search-warpper">
	    			<i class="icon"></i>
		    		<input type="text" placeholder="姓名" class="zs-input" ng-model="userinfo.queryObject['userName:like']"/>
	    		</span>
    		</div>
    		<div class="operation item" style="margin-top:7px;">
    			<input type="button" class="zs-btn orange" value="查询" 
            		ng-click="loadData('userinfo')"/>
    		</div>
    	</div>

        <div class="zs-data-table">
        	<div class="container">
	            <table>
	                <thead>
	                    <tr>
	                        <th>
	                        	<input id="allCheckbox" type="checkbox"
	                        		ng-click="selectAll('userinfo','allCheckbox');">
	                        </th>
	                        <th>姓名/帐号</th>
	                        <th>所属机构</th>
	                        <th>所属角色</th>
	                        <th>登录是否启用</th>
	                    </tr>
	                </thead>
	                <tbody>
	                    <tr ng-repeat="r in userinfo.datas">
			                <td><input type="checkbox"
				                    ng-click="selectRow('userinfo',r);"
				                    ng-model="r.selected" />
			                </td>
			                <td>
			                    <a ng-click="editRow('userinfo',r) && openWindow('edit');">
			                        <label ng-bind="r.userName"></label>
			                        <label ng-if="r.accounts">/</label>
			                        <label ng-bind="r.accounts"></label>
			                    </a>
			                </td>
			                <td>
			                    <a ng-click="editRow('userinfo',r) && openWindow('edit');">
			                        <label ng-bind="r.organizationName"></label>
			                        <label ng-bind="r.departmentName"></label>
			                        <label ng-bind="r.operatingPostName"></label>
			                    </a>
			                </td>
			                <td>
			                    <a ng-click="editRow('userinfo',r) && openWindow('edit');">
			                        <label ng-bind="r.roleNames"></label>
			                    </a>
			                </td>
			                <td>
			                    <a ng-click="editRow('userinfo',r) && openWindow('edit');">
			                        <label ng-bind="r.valid | asChineseBool"></label>
			                    </a>
			                </td>
			            </tr>
	                </tbody>
	            </table>
        	</div>
        </div>
        <div class="zs-pagination-box">
            <ag-Page fn='userinfo'></ag-Page>
        </div>

        <div ag-Window id="edit" title="用户信息" width='620px' height='160px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form" novalidate>
				    <table width="100%">
				        <tbody>
				        	
				        	<tr>
	                            <td class="text" width="20%">姓名：</td>
	                            <td class="left" width="30%">
	                            	<label ng-bind="userinfo.editRow.userName"></label>
	                            </td>
	                            <td class="text" width="20%">所属机构：</td>
	                            <td class="left" width="30%">
	                            	<label ng-bind=" userinfo.editRow.organizationName"></label>
	                            	
	                            	<!--<input type="text"
	                                ng-model="userinfo.editRow.sex" class="zs-input"></td>-->
	                                
	                               
	                        </tr>
	                        
	                        <tr>
	                        	 <td class="text" width="20%">所属部门：</td>
		                        <td class="left" width="30%">
		                        	<label ng-bind=" userinfo.editRow.departmentName"></label>
				                
				                </td>
	                     
		                        <td class="text" width="20%">详细地址：</td>
		                        <td colspan="3" class="left" width="80%">
		                       		<label ng-bind=" userinfo.editRow.local"></label>
		                        </td>
		                    </tr>
	                        <tr>
	                            <td class="text" width="20%">电话：</td>
	                            <td class="left" width="30%">
	                            	<label ng-bind="userinfo.editRow.tel"></label>
	                            	
	                            	</td>
	                            <td class="text" width="20%">邮件：</td>
	                            <td class="left" width="30%">
	                            	<label ng-bind="userinfo.editRow.email"></label>
	                            	</td>
	                        </tr>
	                        
	                        
				        	
				        	<!--<tr>
	                            <td class="text" width="20%">姓名</td>
	                            <td class="left" width="30%">
	                            	<input type="text" alias="姓名"
	                                name="formUserName" ng-model="userinfo.editRow.userName"
	                                class="zs-input" required>
	                            </td>
	                            <td class="text" width="20%">性别</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.sex" class="zs-input"></td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">所属机构</td>
	                            <td class="left" width="30%">
									<ag-Combotree class="zs-input" style="width:172px;height: 28px" 
										fn='orgidEdit'
										para="{ uDictionary:true,
												dictionary:'p_organization',
												nfn:'depEdit,postEdit,workEdit',
												pidField:'pid',
	                    						leafField:'leaf'}"
										ng-model="userinfo.editRow.organizationId"
										text-Value="userinfo.editRow.organizationName"/>
	                            </td>
	                            <td class="text" width="20%">所属部门</td>
		                        <td class="left" width="30%">
				                    <ag-Combobox class="zs-input" style="width:172px;height:28px;"
		                        		fn='depEdit' para="{sn:'department',
		                        				nfn:'posiEdit',
		                        				pfn:'orgidEdit',
                    							foreignField:'organizationId',
												defaultQueryObject:{valid:true},
												orderObject:{order:0}}"
				                        ng-model="userinfo.editRow.departmentId"
				                        text-Value="userinfo.editRow.departmentName" />
				                </td>
	                        </tr>
	                        <tr>
	                        	<td class="text" width="20%">岗位</td>
	                            <td class="left" width="30%">
	                            	<ag-Combobox class="zs-input" style="width:172px;height:28px;" 
		                    			fn='postEdit' para="{sn:'operatingPost',
		                    				pfn:'orgidEdit',
		                    				foreignField:'organizationId',
											defaultQueryObject:{valid:true},
											orderObject:{order:0}}"
									ng-model="userinfo.editRow.operatingPostId"
									text-Value="userinfo.editRow.operatingPostName"/>
	                            </td>
	                        	<td class="text" width="20%">职位</td>
		                        <td class="left" width="30%">
				                    <ag-Combobox class="zs-input" style="width:172px;height:28px;"
		                        		fn='posiEdit' para="{sn:'position',
	                        				pfn:'depEdit',
	                        				foreignField:'departmentId',
											defaultQueryObject:{valid:true},
											orderObject:{order:0}}"
				                        ng-model="userinfo.editRow.positionId"
				                        text-Value="userinfo.editRow.positionName" />
				                </td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">工作组</td>
	                            <td class="left" width="30%">
	                            	<ag-Combobox class="zs-input" style="width:172px;height:28px;" 
		                    			fn='workEdit' para="{sn:'workingGroup',
		                    				pfn:'orgidEdit',
		                    				foreignField:'organizationId',
											defaultQueryObject:{valid:true},
											orderObject:{order:0}}"
									ng-model="userinfo.editRow.workingGroupId"
									text-Value="userinfo.editRow.workingGroupName"/>
	                            </td>
	                            <td class="text" width="20%">生日</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.birth" class="zs-input"></td>
	                        </tr>
	                        <tr>
		                        <td class="text" width="20%">住址</td>
		                        <td colspan="3" class="left" width="80%">
		                        	<span>
		                        		<ag-Combobox class="zs-input" style="width:137px;"
			                        		fn='rsheng' 
			                        		para="{	uDictionary:true,
			                        				dictionary:'p_administrative',
			                        				nfn:'rshi',
		                    						pidField:'pid'}"
					                        ng-model="userinfo.editRow.sheng"
					                        text-Value="userinfo.editRow.shengName" />

			                        
				                    </span>
				                    <span>
				                    	

				                        <ag-Combobox class="zs-input" style="width:137px;"
				                    		fn='rshi' 
				                    		para="{	uDictionary:true,
			                        				dictionary:'p_administrative',
			                        				pfn:'rsheng',
                        							nfn:'rxian',
		                    						pidField:'pid'}"
					                        ng-model="userinfo.editRow.shi"
					                        text-Value="userinfo.editRow.shiName" />
				                    </span>
				                    <span>
				                    	
				                        
				                        <ag-Combobox class="zs-input" style="width:137px"
			                        		fn='rxian' 
			                        		para="{	uDictionary:true,
			                        				dictionary:'p_administrative',
			                        				pfn:'rshi',
	                        						pidField:'pid'}"
					                        ng-model="userinfo.editRow.xian"
					                        text-Value="userinfo.editRow.xianName" />
				                    </span>
		                        </td>
		                    </tr>
		                    <tr>
		                        <td class="text" width="20%">详细地址</td>
		                        <td colspan="3" class="left" width="80%"><input type="text"
		                            class="zs-input" ng-model="userinfo.editRow.local"></td>
		                    </tr>
	                        <tr>
	                            <td class="text" width="20%">电话</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.tel" class="zs-input"></td>
	                            <td class="text" width="20%">邮件</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.email" class="zs-input"></td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">学历</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.degree" class="zs-input"></td>
	                            <td class="text" width="20%">毕业学校</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.graduateSchool" class="zs-input"></td>
	                            
	                        </tr>
	                        <tr>
	                        	<td class="text" width="20%">民族</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.nation" class="zs-input"></td>
	                            <td class="text" width="20%">入职时间</td>
	                            <td class="left" width="30%"><input type="text"
	                                ng-model="userinfo.editRow.enterTime" class="zs-input"></td>
	                        </tr>-->
				        </tbody>
				        <tfoot>
				            <tr>
				                <td colspan="5">
				                 <!--   <input type="button" name="ok" value="保存" class="zs-btn c-red"
				                    	ng-click="formValidate(form) && save('userinfo', userinfo.editRow, saveCloseWindow)"/>-->
				                    <input type="button" name="ok" value="关闭" class="zs-btn c-green" 
				                    	ng-click="closeWindow('edit')" />
				                </td>
				            </tr>
				        </tfoot>
				    </table>
				</form>
			</div>
	    </div>

	    <div ag-Window id="edit2" title="登录授权" width='420px' height='180px'>
	        <div class="zs-form-tab ibox">
	        	<form name="form2" novalidate>
				    <table>
				        <tbody>
				        	<tr>
	                            <td class="text" width="20%">帐号</td>
	                            <td colspan="3" class="left" width="80%">
	                            	<input type="text" alias="帐号"
	                                	ng-model="userauthentication.editRow.accounts"
	                                	class="zs-input" required>
	                            </td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">密码</td>
	                            <td colspan="3" class="left" width="80%">
	                            	<input type="text" alias="密码"
		                                ng-model="userauthentication.editRow.password"
		                                class="zs-input" required>
		                       	</td>
	                        </tr>
	                        <tr>
	                            <td class="text" width="20%">是否启用</td>
	                            <td colspan="3" class="left" width="80%">
	                            	<input type="checkbox" ng-model="userauthentication.editRow.valid"
		                        		ng-true-value="true" ng-false-value="false" value='false' />
								</td>
	                        </tr>
				        </tbody>
				        <tfoot>
				            <tr>
				                <td colspan="5">
				                    <input type="button" name="ok" value="授权" class="zs-btn c-red"
				                    	ng-click="formValidate(form2) && saveUserAuthentication('userauthentication', userauthentication.editRow, saveCloseWindow)"/>
				                    <input type="button" name="ok" value="取消" class="zs-btn c-green" 
				                    	ng-click="closeWindow('edit2')" />
				                </td>
				            </tr>
				        </tfoot>
				    </table>
				</form>
			</div>
	    </div>

	    <div ag-Window id="edit3" title="用户角色" width='440px' height='610px'>
	        <div class="zs-form-tab ibox" data-ng-init="iniTab('datatab', 'tab1', 'selected');">
	        	<form name="form3" novalidate>
	        		<div class="zs-itab">
						<div class="zs-itab-title">
							<ul class="idTabs">
								<li><a ng-click="setTab('datatab', 'tab1');" 
									class="{{tabs['datatab'].tabClass['tab1']}}">所属角色</a></li>
							</ul>
						</div>
					</div>

					<div ng-show="tabs['datatab'].tabShow['tab1']" style="height: 490px;margin:5px 10px">
					    <!-- <ag-Tree fn='role'
					    	para="{	pidField:'pid',
        							leafField:'leaf',
        							onlyLeafCheck:true,
        							bindField:'roleId',
        							bindFn:'roles',
									defaultQueryObject:{valid:true},
									queryObject:{pid:''},
									orderObject:{order:0}}"
							ng-model="userinfo.editRow.roles" /> -->

						<ag-Tree 
							para="{ uDictionary:true,
									dictionary:'p_role',
									pidField:'pid',
        							leafField:'leaf',
        							onlyLeafCheck:false,
        							bindField:'roleId',
        							bindFn:'roles',
        							intLoadLevel:2}"
							ng-model="userinfo.editRow.roles" />
				    </div>

					<div>
				    	<table width="100%">
				    		<tfoot>
				    			<tr>
				    				<td>
				    					<input type="button" name="ok" value="保存" class="zs-btn c-red"
					                    	ng-click="formValidate(form3) && save('userinfo', userinfo.editRow, saveCloseWindow)"/>
					                    <input type="button" name="ok" value="关闭" class="zs-btn c-green" 
					                    	ng-click="closeWindow('edit3')" />
				    				</td>
				    			</tr>
				    		</tfoot>
				    	</table>
				    </div>
				</form>
			</div>
	    </div>
    </div>
</div>